<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
</head>
<body>
    <img src="./img_the_scream.jpg" width="220" height="277" >
    <canvas id="myCanvas" width="250" height="300" style="border:1px solid #d3d3d3;">

    </canvas>
    <script>
        const canvas=document.getElementById("myCanvas")
       const ctx= canvas.getContext("2d")
       const img=document.querySelector("img")
       img.onload=function(){
        ctx.drawImage(img,10,10);
        img.style.display="none"
       }
     
    </script>
</body>
</html>